//
//  Page2.m
//  HelloWorld_Storyboard
//
//  Created by Daehee Han on 6/27/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import "Page2.h"

@implementation Page2

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

#pragma mark - View lifecle

- (IBAction)samePage 
{
    UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"You Are Already In View 2!" 
                                                       delegate:self 
                                              cancelButtonTitle:@"Ok" 
                                         destructiveButtonTitle:nil 
                                              otherButtonTitles:nil];
    [sheet showInView:self.view];
}
- (IBAction)hellWorld
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Heya!" 
                                                    message:@"This is Hello from View 2" 
                                                   delegate:self
                                          cancelButtonTitle:@"Ok"
                                          otherButtonTitles:nil];
    [alert show];
    
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end
